<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>首页</title>
	</head>
	<style type="text/css">
		
	</style>
	<BODY>  
	<input type="button" onclick="Scan0();" value="开始" accept="image/*">
	<input type="text" name="txtcode" id ="txtcode" value="000"> 
	<input type="hidden" name="code" id ="code" value=""> 
	<script type="text/javascript">
		function Scan0(){
			var scrWidth = screen.availWidth;
			var scrHeight = screen.avaiHeight;
			var ret=window.open("live2.html", "扫描条形码","menubar=false;titlebar=false;toolbar=false;dialogWidth=" + scrWidth + ";dialogHeight="+ scrHeight);
			//var ret = window.showModalDialog("live2.html", "扫描条形码","dialogWidth=" + scrWidth + ";dialogHeight="+ scrHeight);
			//alert(ret);
			//alert(ret.returnValue);
			//var code = document.getElementById("code").value;
			//alert(code);
			
		}
		
		function setValue(code){
		//alert(code);
		document.getElementById("txtcode").value=code;
		console.log(code);
		}
		
	</script>
</BODY>  
</html>
